package review.entity.model;

import java.util.List;

import com.alibaba.fastjson.JSONObject;

import lombok.Data;
import review.entity.TitleLevel;

@Data
public class TitleTreeModel {
  private Integer id;
  private String name;
  private List<TitleLevel> levels;

  public JSONObject toJSON() {
    JSONObject obj = new JSONObject();
    obj.put("id", id);
    obj.put("name", name);
    obj.put("levels", levels);
    return obj;
  }
}
